//
//  BaseViewController.h
//  GK
//
//  Created by Seven on 2018/12/19.
//  Copyright © 2018 Seven. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIViewController+Category.h"
#import "BaseNavigationController.h"
#import "BaseView.h"
@interface UIViewController(dealoc)

#pragma mark - Active
- (void)didBecomeActive;
- (void)willResignActive;

- (void)viewAppear;
- (void)viewDisappear;

#pragma mark - landscape
- (void)willChangeLandscape:(BOOL)isLandscape;

@end

NS_ASSUME_NONNULL_BEGIN

@interface BaseViewController : UIViewController

IT_PROPERTY_STRONG UIView *topView;
IT_PROPERTY_STRONG UIButton *backBtn;
IT_PROPERTY_STRONG UILabel *titleLbl;
IT_PROPERTY_STRONG CAGradientLayer *gradientLayer;
//fd_prefersNavigationBarHidden
@property(nonatomic, assign) NSInteger statusBarStyle;
@property(nonatomic, assign) BOOL viewShowed;

@property(nonatomic, assign) BOOL ignoreViewAppear;

@property(nonatomic, assign) BOOL hideTopView;
@property(nonatomic, assign) CGRect contentFrame;

IT_PROPERTY_ASSIGN BOOL isLandscape;

@property (nonatomic, copy) NSString *fixedTitle;

@property(nonatomic, copy)CustomAction customAction;//自定义block

@property(nonatomic, copy)UIView *emptyView;
@property(nonatomic, copy)UIView *networkErrorEmptyView;
@property(nonatomic, assign) BOOL ignoreEmptyView;
/**
 type:类型, 1 问答, 2 投票,  4 竞猜, 5-链接, 6-实时投票, 7-话题 ,
 100:首页recommend, 101:分类视频列表, 102:话题视频列表, 103 foryou 110today
 200:消息
 */

IT_PROPERTY_ASSIGN int type;

- (void)createSubViews;
- (void)leftReturnAction;

- (void)showEmptyView;
- (void)showEmptyView:(int)statusCode;
- (void)hideEmptyView;
- (void)onEmptyAction;


- (void)willDealloc;

- (void)onBackAction;

- (void)updateContentFrame;

- (void)setTopColor:(UIColor *)color;

/**改变横屏状态*/
//- (void)willChangeLandscape:(BOOL)isLandscape;


- (void)didUpdateConfig;

@end

NS_ASSUME_NONNULL_END
